#ifndef __TALL_GRASS_BLOCK_H__
#define __TALL_GRASS_BLOCK_H__

#include "Block.hpp"

namespace PocketSurvival
{
    // 高草
    class TallGrassBlock : public Block
    {
    public:
        static constexpr int32_t Index()
        {
            return 19;
        }
        virtual void getDropValues(int32_t oldValue, int32_t newValue, int32_t toolLevel, std::vector<BlockDropValue> &dropValues) override;
        virtual int32_t getIndex() override; 
        virtual const std::string &getBlockName() override;


        static inline bool GetIsSmall(int32_t data);
        static inline int32_t SetIsSmall(int32_t data, bool isSmall);
    };

    inline bool TallGrassBlock::GetIsSmall(int32_t data)
    {
        return (data & 8) != 0;
    }
    inline int32_t TallGrassBlock::SetIsSmall(int32_t data, bool isSmall)
    {
        if(isSmall == false)
        {
            return data & -9;
        }
        return data | 8;
    }

} // namespace PocketSurvival


#endif
